<template>
    <a-config-provider :locale="zhCN" :prefixCls="appName">
        <a-spin tip="内容加载中..." class="globalLoading" v-if="appStore.loading"></a-spin>

        <router-view/>
    </a-config-provider>
</template>

<script setup>
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import layout from '@/layout';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import { ref } from 'vue';
import {useAppStore} from '@/store/app'

dayjs.locale('zh-cn');
const appStore = useAppStore()

const appName = ref(process.env.VUE_APP_NAME)

</script>

<style scoped lang="less">
.globalLoading{
    position: fixed;
    top: 40%;
    left: calc(50% - 42px);
    z-index: 1000;
}
</style>
